package com.handu.luna.core.domain.promotion;

import com.handu.luna.core.domain.BaseRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface TopicModuleRepository extends BaseRepository<TopicModule>{

    @Modifying
    @Query(value = "update TopicModule t set t.name = ?1,t.goodsNum = ?2,t.displayOrder = ?3,t.adPositionId = ?4 where t.id = ?5")
    public void update(String name,int goodsNum,int displayOrder,long adPositionId,long id);

    @Modifying
    @Query(value = "update TopicModule t set t.goods = ?1 where t.id = ?2")
    public void updateGoods(String goods,long id);

}
